<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
</head>
<body>
<div id="box"></div>
<script>
var box = document.getElementById("box");
console.log(box.nodeName);  // 所有的节点都有
console.log(box.tagName);  // 只针对元素节点
box.id = "abc"
console.log(box.id);

box.className = "aaa"
console.log(box.className);
</script>
</body>
</html>